<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>水平步骤条</title>
    <style>
        ul {
            width: 800px;
            list-style: none;
            padding: 0;
            display: inline-block;

        }
        .clearfix::after {
            content: "";
            display: block;
            clear: both;
        }
        .content {
            text-align: center;
        }
        ul li {
            /* border: 1px solid blue; */
            float: right;
            text-align: center;
            line-height: 50px;
        }

        ul li:nth-child(odd) {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background-color: #ddd;

        }

        ul li:nth-child(even) {
            width: 100px;
            border-top: 2px dashed #ddd;
            position: relative;
            top: 24px;

        }

        ul li.current {
            background-color: skyblue;
            color: #fff;

        }

        ul li.current~li:nth-child(odd) {
            background-color: skyblue;
            color: #fff;

        }

        ul li.current~li:nth-child(even) {
            border-top: 2px dashed skyblue;
            color: #fff;

        }
    </style>
</head>

<body>
    <div class="content">
    <ul class="clearfix">
        <li>5</li>
        <li></li>
        <li>4</li>
        <li></li>
        <li class="current">3</li>
        <li></li>
        <li>2</li>
        <li></li>
        <li>1</li>
    </ul>
    </div>
</body>

</html>
